Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/pages/config/[...page].tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Layout } from "antd";6import { join } from "path";78import ConfigLayout from "components/account/config/layout";9import Footer from "components/landing/footer";10import Head from "components/landing/head";11import Header from "components/landing/header";12import { Paragraph } from "components/misc";13import A from "components/misc/A";14import basePath from "lib/base-path";15import { Customize } from "lib/customize";16import withCustomize from "lib/with-customize";1718export default function Preferences({ customize, page }) {19function noteAboutConfig() {20return (21<Paragraph22type="secondary"23style={{24padding: "15px",25margin: 0,26textAlign: "center",27borderTop: `1px solid lightgray`,28}}29>30This is the account configuration page.{" "}31<A href={join(basePath, "settings")} external>32You can also adjust key preferences in the main app...33</A>34</Paragraph>35);36}3738return (39<Customize value={customize}>40<Head title="Configuration" />41<Layout>42<Header page={"account"} />43<ConfigLayout page={page} />44{noteAboutConfig()}45<Footer />46</Layout>47</Customize>48);49}5051export async function getServerSideProps(context) {52const { params, res } = context;53const { page = [] } = params;5455const [_, sub] = page;56if (sub == null) {57return res.redirect(307, "./search/input");58}5960return await withCustomize({ context, props: { page } });61}626364